^n C In C

[Solved] ^n C In C | C - Code Explorer | yomemimo.com
Question : %[^\n]%*c in c

Answered by : aroosa-amjad

%*[^\n] scans everything until a \n, but doesn't scan in the \n. The asterisk(*) tells it to discard whatever was scanned.
%*c scans a single character, which will be the \n left over by %*[^\n] in this case. The asterisk instructs scanf to discard the scanned character.

Source : https://stackoverflow.com/questions/30065675/what-does-scanf-nc-mean | Last Update : Mon, 26 Sep 22

Answers related to ^n c in c

Code Explorer Popular Question For C